import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        /*十进制数转为二进制数*/
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        System.out.println(toBinaryString(num));
        System.out.println(Integer.toBinaryString(num));

    }

    public static String toBinaryString(int num) {

        StringBuilder sb = new StringBuilder();
        while (true) {
            if (num == 0){
                break;
            }
            int remainder = num % 2;
//            System.out.println(remainder);
            sb.insert(0,remainder);
            num = num / 2;
        }
        return sb.toString();

    }
}
